import { createApp } from 'vue'
import { createPinia } from 'pinia'
import { registerMicroApps, start } from 'qiankun';
import App from './App.vue'
import router from './router'

import {useAntVue} from './ant-vue'

import './css/full-height-table-global.scss'
import './lib/global-def-impl'
const app = createApp(App)
useAntVue(app)
app.use(createPinia())
app.use(router)
app.config.errorHandler = (err) => {
    console.error(err)
  }
app.mount('#app')

// 还是有问题呀 ， 那一个vue2 加入 qiankun ， 但是不用 qiankun-vite-plugin 试试
registerMicroApps(
  [
    {
      name: 'user app', // app name registered
      entry: '//localhost:5174/user-app/',
      //entry: '/user-app/',
      container: '#userAppContainer',
      activeRule: '/userApp',
    }
  ]
);

start();